package main

import (
	// _ "gitee.com/RocsSun/report/core/dbs"

	_ "gitee.com/RocsSun/report/config"
	"gitee.com/RocsSun/report/services"
	// _ "gitee.com/RocsSun/report/dbs"
)

func main() {

	// dbs.NewConn()

	// repository := repositories.NewReportCurd()

	// resp := repository.GetLastTradetNetWork()
	// config.ReadNetFlowList()
	spider := services.NewYesterdayReportDataSpider()
	saves := services.NewSaveData()
	// spider.DevOpsReportProcess("192.168.20.66")
	// fmt.Println(spider.DevOpsReportNetWork())
	resp := spider.DevOpsReportNetWork()
	saves.SaveDevOpsNetFlowData(resp)
	// config.ReadMachineList()
	// username := "sunpengfei"
	// password := "123456"

	// op := managerEngine.NewOpManagerClient()
	// op.Methods.Login(username, password)

	// resp := op.YesterdayMonitorCpuData("192.168.20.73")
	// for _, v := range resp {
	// 	if v != nil {
	// 		fmt.Println(v)
	// 	}
	// }

	// for _, v := range resp {
	// 	fmt.Println(*v)
	// }

	// fmt.Println(time.Now().Add(-time.Hour * 24))
	// fmt.Println(resp)
	// fmt.Println(len(resp))
	// fmt.Println(string(resp[5].Body()))
	// host := "http://192.168.4.230:8060/"

	// services.ReportService.ReportCpusDatas("192.168.20.66")

	// paths := []string{
	// 	"todo.tmpl",
	// }
	// t := template.Must(template.New("html-tmpl").ParseFiles(paths...))
	// err := t.Execute(os.Stdout, t)
	// if err != nil {
	// 	panic(err)
	// }
}
